package com.iooiee;

import com.iooiee.iocbeanlifecicle.MainConfig;
import com.iooiee.iocbeanlifecicle.Person;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @Author: Yanggc
 * DateTime: 2020-05-22
 */
public class MainStart {
	public static void main(String[] args) {
		//读取配置文件
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MainConfig.class);

//		ClassPathXmlApplicationContext context1 = new ClassPathXmlApplicationContext("beans.xml");

		Person person = (Person) context.getBean("person");
		System.out.println("person"+person);
	}
}
